<?php echo $this->Form->create('Payment'); ?>
<?php
echo $this->Form->hidden("Payment.id");
echo $this->Form->hidden("Payment.proyect_id");
?>

<script>
    $(function() {
        $( ".calendario" ).datepicker();
    });
</script>


<table id="tabla"  class="tabla">
    <thead>
        <tr>
            <th>Propiedad</th>
            <th>Valor</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><?php echo "Fecha programación" ?></td>
            <td><?php echo $this->Form->input('Payment.fecha_pago_programado', array('label' => '', 'class' => 'calendario', 'type' => 'text')); ?></td>            
        </tr>
        <tr>
            <td><?php echo "Fecha solicitud desembolso" ?></td>
            <td><?php echo $this->Form->input('Payment.fecha_solicitud_desembolso', array('label' => '', 'class' => 'calendario', 'type' => 'text')); ?></td>            
        </tr>
        <tr>
            <td><?php echo "Fecha de pago" ?></td>
            <td><?php echo $this->Form->input('Payment.fecha_pago_real', array('label' => '', 'class' => 'calendario', 'type' => 'text')); ?></td>            
        </tr>
        <tr>
            <td><?php echo "Monto" ?></td>
            <td><?php echo $this->Form->input('Payment.monto') ?></td>
        </tr>
        <tr>
            <td><?php echo "Tipo" ?></td>
            <td><?php echo $this->data['Payment']['tipo']; ?></td>
        </tr>
        <tr>
            <td><?php echo "Persona encargada del Proyecto" ?></td>
            <td><?php echo $nombreUsuario['User']['nombre'] . " " . $nombreUsuario['User']['primer_apellido'] . " " . $nombreUsuario['User']['segundo_apellido'] ?></td>
        </tr>
    </tbody>
</table>

<table width="100%" border="0"  CellSpacing=10  align="center" >
    <tbody>
        <tr>          
            <td><?php
echo $this->Ajax->submit('Guardar', array('url' => array('controller' => 'Payments', 'action' => 'edit2', $this->data['Payment']['id']), 'update' => 'content', 'indicator' => 'loading'));
echo $this->Form->end();
?>
            </td>
            <td><?php echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'Payments', 'action' => 'index'), array('update' => 'content', 'indicator' => 'loading', 'escape' => false)); ?></td>
        </tr>
    </tbody>
</table>